<template>
  <div class="view">
    <div class="page">
      <slot></slot>
    </div>
  </div>
</template>

<script>

export default {
  name: 'Page'
}
</script>

<style lang="scss">
  .view {
    width: 100%;
    height: 100%;
    overflow: hidden;
    .page {
      width: 100%;
      height: 100%;
      overflow: hidden;
      box-sizing: border-box;

      &.has-header {
        padding-top: 3rem + 1.25rem;
      }
      &.has-footer {
        padding-bottom: 3rem;
      }

      .page-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 3rem + 1.25rem;
        background: #1e82d2;
        z-index: 10;

        .page-header__top {
          height: 1.25rem;
          width: 100%;
          background: #1e82d2;
        }
        .vux-header {
          background: #1e82d2;
          font-size: 1.125rem;
          height: 3rem;
      }
    }

    .page-content {
      position: relative;
      height: 100%;
      box-sizing: border-box;

      &.inner {
        .page-content-inner {
          padding: 0 0.8rem;
        }
      }

      // fix
      ._v-content {
        position: relative;
        min-height: 100%;

        .loading-layer {
          position: absolute;
          top: 100%;
        }
      }
    }

    .page-footer {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: 3rem;
      &:empty {
        display: none;
      }
    }
  }
  }
</style>
